import { store, storeCommitPath } from "@/store/index";

// import APIConst from "@/common/constants/APIConst";
// import { APIResponse } from "@/common/model/APIResponse";
// import { Attachment } from "../model/Attachment";
// import { HttpClient } from "@/axios/HttpClient";
import MMService from "@/common/services/MMService";

const DropDownService = {
  // async GetTeam () {
  //   const Response = await MMService.GetMM('Team', 'TeamCode', true)
  //   store.commit(storeCommitPath.DropDownStore.setTeam, Response)
  // },
  // async GetDepartment () {
  //   const Response = await MMService.GetMM('Department', 'DepartmentCode', true)
  //   store.commit(storeCommitPath.DropDownStore.setDepartment, Response)
  // },
  // async getJobCateList () {
  //   const Response = await MMService.GetMM('JobCate', 'CateDesc', true)
  //   store.commit(storeCommitPath.DropDownStore.setJobCateList, Response)
  // },
  // async GetEntityType () {
  //   const Response = await MMService.GetMM('EntityType', 'EntType', true)
  //   store.commit(storeCommitPath.DropDownStore.setEntityType, Response)
  // },
  async GetEntity() {
    const Response = await MMService.GetMM("Entity", "EntNum", true);
    store.commit(storeCommitPath.DropDownStore.setEntities, Response);
  },
  // async GetCenterList () {
  //   const Response = await MMService.GetMM('Room', 'CenterCode', true)
  //   store.commit(storeCommitPath.DropDownStore.setCenterList, Response)
  // },
  // async GetActivityType () {
  //   const Response = await MMService.GetMM('ActType', 'CenterCode', true)
  //   store.commit(storeCommitPath.DropDownStore.setActivityTypes, Response)
  // },
  // async GetMemGrpType () {
  //   const Response = await MMService.GetMM('MemGrp', 'MemGrpDesc', true)
  //   store.commit(storeCommitPath.DropDownStore.setMemGrpList, Response)
  // },
  // async GetPayMethod () {
  //   const Response = await MMService.GetMM('PayMethod', 'PayMethodDesc', true)
  //   store.commit(storeCommitPath.DropDownStore.setPayMethodList, Response)
  // },
  // async GetSponsor () {
  //   const Response = await MMService.GetMM('Sponsor', 'SponsorDesc', true)
  //   store.commit(storeCommitPath.DropDownStore.setSponsorList, Response)
  // },
  // async GetCenter () {
  //   const Response = await MMService.GetMM('Center', 'CenterCode', true)
  //   store.commit(storeCommitPath.DropDownStore.setCenterList, Response)
  // },
  // async GetUserGrp () {
  //   const Response = await MMService.GetMM('UserGrp', 'GrpID', true)
  //   store.commit(storeCommitPath.DropDownStore.setUserGrp, Response)
  // },
  // async GetCaseType () {
  //   const Response = await MMService.GetMM('CaseType', 'CaseTypeDesc', true)
  //   store.commit(storeCommitPath.DropDownStore.setCaseTypeList, Response)
  // },
  // async GetSysLang () {
  //   const resObj = {}
  //   const Response = await HttpClient.post<APIResponse>(
  //     APIConst.localization.languages,
  //     resObj
  //   )
  //   const data = Response.data
  //   if (data.IsSuccess) {
  //     for (const element of data.Data) {
  //       element.LongName =
  //         element.LongName == 'Traditional Chinese'
  //           ? '繁體中文'
  //           : element.LongName
  //     }
  //     store.commit(storeCommitPath.DropDownStore.setSysLang, data.Data)
  //     return Promise.resolve(data.Data)
  //   } else {
  //     return Promise.reject([])
  //   }
  // },
  // async GetDistrict () {
  //   const Response = await MMService.GetMM('District', 'EDesc', true)
  //   store.commit(storeCommitPath.DropDownStore.setDistrict, Response)
  // },
  // async GetRegions () {
  //   const Response = await MMService.GetMM('Region', 'RegionCode', true)
  //   store.commit(storeCommitPath.DropDownStore.setRegions, Response)
  // },
  // async GetExpensesType () {
  //   const Response = await MMService.GetMM('ExpensesType', 'ExpendType', true)
  //   store.commit(storeCommitPath.DropDownStore.setExpensesType, Response)
  // },
  // async GetAttachments () {
  //   // let Response = await MMService.GetMM("Attachment", "DocNum", true);
  //   const Response: Attachment[] = []
  //   store.commit(storeCommitPath.DropDownStore.setAttachment, Response)
  // },
  // async GetPipe () {
  //   const Response = await MMService.GetMM('Pipe', 'PipeID', true)
  //   store.commit(storeCommitPath.DropDownStore.setPipe, Response)
  // },
  // async GetMethod () {
  //   const Response = await MMService.GetMM('Method', 'MethodCode', true)
  //   store.commit(storeCommitPath.DropDownStore.setMethod, Response)
  // },
  // async GetWater () {
  //   const Response = await MMService.GetMM('Water', 'WaterType', true)
  //   store.commit(storeCommitPath.DropDownStore.setWater, Response)
  // },
  // async GetMaterial () {
  //   const Response = await MMService.GetMM('Material', 'MatCode', true)
  //   store.commit(storeCommitPath.DropDownStore.setMaterial, Response)
  // },
  // async GetSysStatus () {
  //   const Response = await MMService.GetMM('SysStatus', 'StatusCode', true)
  //   store.commit(storeCommitPath.DropDownStore.setSysStatus, Response)
  // }
};
export default DropDownService;
